package com.zhouchb.stream;

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * @Author Zhouchb
 * @Create 2021-11-2021/11/1 :19:45
 * @Description
 */
public class StandardStream {
    public static void main(String[] args) {
        BufferedReader br = null;
        try {
            InputStreamReader isr = new InputStreamReader(System.in);//转换流
            br = new BufferedReader(isr);
            String data;
            while (true){
                System.out.println("请输入字符串");
                data = br.readLine();
                if ("e".equalsIgnoreCase(data)||"exit".equalsIgnoreCase(data)){
                    System.out.println("程序结束！！！！！");
                    break;
                }
                String s = data.toUpperCase();
                System.out.println(s);
            }
        } catch (IOException e) {
            e.printStackTrace();
        } finally {
            try {
                if (br!=null)
                br.close();
            } catch (IOException e) {
                e.printStackTrace();
            }
        }
    }
}
